{% extends "base.volt" %}
{% block pageFooter%}

        {{ javascript_include("/js/area.js", false) }}
        {{ javascript_include("/assets/manage/js/areaAdd.js", false) }}
        {{ javascript_include("/assets/manage/js/bp/bannerBpAdd.js", false) }}
{% endblock %}

{% block content %}
    {{ partial("module/left_question") }}
    <div class="col-xs-10">
        <ol class="breadcrumb">
            <li><a href="{{ url.get('question/list') }}">问答管理</a></li>
            <li class="active">添加首页问答推荐</li>
        </ol>

        <form id="form_add" class="form-horizontal" role="form" method="post" durl="{{ url.get('question/question_recommend_list') }}" action="" target="ifr_send_file" enctype="multipart/form-data">
            <input type="hidden" name="callback" value="parent.setFormResult">
            <input type="hidden" name="activity_type" value="1">
            <div class="form-group">
                <label for="activity_title" class="col-xs-2 control-label">问答ID</label>
                <div class="col-xs-2">
                    <input type="text" class="form-control" value="{{question_id}}" id="activity_title" name="question_id" data-rule="required;">
                </div>
            </div>
           <!--  <div class="form-group">
                <label for="activity_title" class="col-xs-2 control-label">首页标题</label>
                <div class="col-xs-2">
                    <input type="text" class="form-control" id="" name="title" data-rule="required;length[1~10]">
                </div>
            </div>
            <div class="form-group">
                <label for="activity_cover" class="col-xs-2 control-label">首页图片</label>
                <div class="col-xs-9">
                    <input type="file" class="form-control" id="activity_cover" name="question_cover" data-rule="required;">
                    <p class="help-block">该图片用于首页问答展示，像素大小为：210x210。</p>
                </div>
            </div> -->
            <div class="form-group">
                <label class="col-xs-2 control-label">推荐城市</label>
                <div class="col-xs-4">
                <div class="input-group">
                    <label class="input-group-addon">市</label>
                    <select class="form-control" name="filterCity" id="filterCity" dvalue="{{ filterCity|escape_attr }}">
                         {% if filterCity == 0 %}
                                <option value="0" {{ filterCity == 0 ? 'selected="selected"' : '' }} >全国</option>
                                {% endif %}
                                {% for oc in openCity %}
                                    <option value="{{ oc.city_id }}" {{ filterCity == oc.city_id ? 'selected="selected"' : '' }} >{{ oc.city_name|e }}</option>
                                {% endfor %}
                    </select>
                </div>
                </div>
            </div>


            <!-- <div class="form-group">
                <label for="activity_intro" class="col-xs-2 control-label">首页排序</label>
                <div class="col-xs-2">
                    <select class="form-control" id="" name="sort" data-rule="required;">

                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>

                    </select>
                </div>
            </div> -->
            <div class="form-group">
                <div class="col-xs-12 text-center">
                    <button type="submit" class="btn btn-primary"><i class="fa fa-floppy-o fa-lg"></i> 保 存</button>
                </div>
            </div>
        </form>
    </div>
{% endblock %}